#ifndef QMSYSTEMEXAMPLE_H
#define QMSYSTEMEXAMPLE_H

#include <QObject>
#include <qmbattery.h>
#include <qmdevicemode.h>
#include <qmtime.h>

using namespace MeeGo;

class QmSystemExample : public QObject
{
    Q_OBJECT

    /*!
     * @brief Property
     *
     * Class property of int type for battery remaining talk time in seconds.
     */
    Q_PROPERTY(int remainingTalkTime READ remainingTalkTime NOTIFY remainingTalkTimeChanged)

    /*!
     * @brief Property
     *
     * Class property of int type for battery remaining active use time in seconds.
     */
    Q_PROPERTY(int remainingActiveTime READ remainingActiveTime NOTIFY remainingActiveTimeChanged)

    /*!
     * @brief Property
     *
     * Class property of int type for battery remaining idle time in seconds.
     */
    Q_PROPERTY(int remainingIdleTime READ remainingIdleTime NOTIFY remainingIdleTimeChanged)

    /*!
     * @brief Property
     *
     * Class property of QString type for current device operation mode.
     */
    Q_PROPERTY(QString deviceMode READ deviceMode NOTIFY deviceModeChanged)

    /*!
     * @brief Property
     *
     * Property of QString type for status of the automatic system time setting.
     */
    Q_PROPERTY(QString autoSystemTime READ autoSystemTime NOTIFY autoSystemTimeChanged)

    /*!
     * @brief Property
     *
     * Property of QString type for status of the automatic time zone guessing.
     */
    Q_PROPERTY(QString autoTimeZone READ autoTimeZone NOTIFY autoTimeZoneChanged)

    /*!
     * @brief Property
     *
     * Property of QString type for current time zone.
     */
    Q_PROPERTY(QString timezone READ timezone NOTIFY timezoneChanged)

    /*!
     * @brief Property
     *
     * Property of QString type for automatically guessed time zone.
     */
    Q_PROPERTY(QString timezoneAuto READ timezoneAuto NOTIFY timezoneAutoChanged)

    /*!
     * @brief Property
     *
     * Property of QString type stating if updates from cellular network operator are supported.
     */
    Q_PROPERTY(QString timeFromOperator READ timeFromOperator)

    /*!
     * @brief Property
     *
     * Property of QString type for default time zone defined during device manufacture.
     */
    Q_PROPERTY(QString defaultTimeZone READ defaultTimeZone)

    /*!
     * @brief Property
     *
     * Class property of QString type for device OS version.
     */
    Q_PROPERTY(QString releaseVersion READ releaseVersion)

public:
    explicit QmSystemExample(QObject *parent = 0);
    ~QmSystemExample();

private:
    int remainingTalkTime() const;
    int remainingActiveTime() const;
    int remainingIdleTime() const;

    QString deviceMode() const;

    QString autoSystemTime() const;
    QString autoTimeZone() const;
    QString timezone() const;
    QString timezoneAuto() const;
    QString timeFromOperator() const;
    QString defaultTimeZone() const;
    void settingsChanged(MeeGo::QmTime::WhatChanged);

    QString releaseVersion() const;


signals:
    void remainingTalkTimeChanged();
    void remainingActiveTimeChanged();
    void remainingIdleTimeChanged();

    void deviceModeChanged();

    void autoSystemTimeChanged();
    void autoTimeZoneChanged();
    void timezoneChanged();
    void timezoneAutoChanged();

private:
    QmBattery *m_battery;
    QmDeviceMode *m_deviceMode;
    QmTime *m_time;

};

#endif // QMSYSTEMEXAMPLE_H
